package com.design.yjx.decorator;

/**
 * @author yuanjianxin
 * @date 2017/8/3 11:07
 * 摩卡调料
 */
public class Mocha extends CondimentDecorator {
    //被装饰的类
    private Beverage beverage;

    public Mocha(Beverage beverage) {
        this.beverage = beverage;
    }

    @Override
    public String getDescription() {
        return beverage.getDescription() + ",摩卡";
    }

    @Override
    public double getCost() {
        return beverage.getCost() + 0.5;
    }

}
